<?php
declare (strict_types = 1);

namespace app\api\validate;

use app\common\validate\BasicValidate;

class AccessTokenValidate extends BasicValidate
{
    /**
     * 定义验证规则
     * 格式：'字段名' =>  ['规则1','规则2'...]
     *
     * @var array
     */
    protected $rule = [
		'appid' => 'require',
		'secret' => 'require',
		'access_token' => 'require',
    ];

    /**
     * 定义错误信息
     * 格式：'字段名.规则名' =>  '错误信息'
     *
     * @var array
     */
    protected $message = [
		'appid.reqiure' => '缺少参数appid',
		'secret.require' => '缺少参数secret',
		'access_token' => '缺少参数access_token'
    ];

	protected $scene = [
		'generate' => ['appid','secret'],
		'refresh' => ['appid','secret','access_token']
	];
}
